home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / cprac < prev    next >
Internet Message Format  |  1995-03-31  |  4KB

  1. From helens!shelby!rutgers!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvra!prestonb Mon Jul  2 16:58:27 PDT 1990
  2. Status: RO
  3.  
  4. Article 2052 of comp.sys.handhelds:
  5. Path: helens!shelby!rutgers!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvra!prestonb
  6. >From: prestonb@hpcvra.CV.HP.COM (Preston Brown)
  7. Newsgroups: comp.sys.handhelds
  8. Subject: Re: Card Counting Program           
  9. Message-ID: <25590028@hpcvra.CV.HP.COM>
  10. Date: 2 Jul 90 17:38:25 GMT
  11. References: <25590027@hpcvra.CV.HP.COM>
  12. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  13. Lines: 125
  14.  
  15. %%HP: T(3)A(D)F(.);
  16. DIR
  17. @ CPRAC - practice card counting for blackjack
  18. @ This program requires the CASINO 48 application card.
  19. @ The Casino 48 card must be installed when downloading this file.
  20. @
  21. @ Casino 48 is a fun-filled simulation of a casino for the HP-48SX.
  22. @ It includes four games: Blackjack, Video Poker, Slots and Roulette.
  23. @ It also includes commands for drawing cards onto the screen.  
  24. @ This program uses those commands to practice card counting.
  25. @ With card counting the odds in blackjack can be improved to 
  26. @ give the player an advantage over the house.
  27. @
  28. @ To win at blackjack you first need a good basic strategy,
  29. @ Casino 48 includes a recommend function in blackjack which
  30. @ should be used to learn the best strategy.  Once the strategy
  31. @ is mastered, card counting can be used to set your bet.
  32. @ This program allows you to practice a very simple but effective
  33. @ counting technique.  If you wish to use a more advanced method
  34. @ the CALC procedure can be easily modified for other methods.
  35. @
  36. @ SIMPLE COUNT METHOD:
  37. @ For each 3, 4, 5, or 6 add 1 to the count
  38. @ For each 10-valued card subtract 1 from the count
  39. @ Betting:
  40. @  COUNT       BET UNITS
  41. @    <0           1
  42. @    0,1          2
  43. @    2            3
  44. @    3,4,5        4
  45. @    >6           5 or more (be careful the casino may be watching)
  46. @
  47. @ This simple count does not require the player to keep track
  48. @ of the number of cards remaining in the deck but is still effective.
  49. @ A positive count with most of the deck played is more favorable
  50. @ then with most of the deck unplayed.
  51. @ ************************** NOTICE *****************************
  52. @ Preston Brown Labs does not endorse or recommend card counting.
  53. @ Preston Brown Labs is not responsible for any consequential damages.
  54. @ This program may be distributed freely; in ASCII form with the
  55. @ above information intact.
  56. @
  57. HELP
  58. \<< CLLCD TEXT 3 FREEZE
  59. @123456789012345678912
  60. "Enter number of cards" 1 DISP
  61. "to count: press CPRAC" 2 DISP
  62. "Add 1 for 3-6"         3 DISP
  63. "Sub 1 for 10 valued"   4 DISP
  64. "Raise BET for high"    6 DISP
  65. "counts!"               7 DISP
  66. \>>
  67.  
  68. CPRAC               @ Main practice program
  69. \<< 
  70. IF CHECKCARD THEN   @ Check for Casino 48 card
  71.      ECAR
  72.      {#0 #0} PVIEW
  73.      0                    @ Initial Count
  74.      SWAP 1 SWAP START
  75.             GETCARD DUP DCAR CALC SPEED WAIT ECAR
  76.             NEXT
  77.      ELSE
  78.      CLLCD 3 FREEZE
  79.      @123456789012345678912
  80.      "Requires Casino 48"    1 DISP
  81.      "Ask your HP dealer or" 3 DISP
  82.      "send check for $65 to" 4 DISP
  83.      "Preston Brown Labs"    5 DISP
  84.      "  2597 Pierce"         6 DISP
  85.      "Eugene, OR 97405"      7 DISP
  86.      END
  87. \>> 
  88.  
  89. SPEED 0.5           @ Default Speed (set to any value > 0)
  90.                     @ The larger the value the slower the 
  91.                     @ speed
  92.  
  93. CALC
  94. \<< 
  95. IP
  96. CASE
  97.   DUP 9 > THEN DROP 1 - END            @ 10 Valued Cards subtr 1
  98.   DUP 2 > SWAP 7 < AND THEN 1 + END    @ 3-6 add 1
  99. END
  100. \>>
  101.  
  102. SHUF                @ Shuffle 4 decks of cards
  103. \<< TEXT CLLCD
  104. "Shuffling..." 1 DISP
  105. "                          " DUP + DUP + DUP + 'DECK' STO 
  106. 0 51 FOR i i CHR NEXT 
  107. 52 DUPN 104 DUPN 
  108. 208 1 FOR I I RAND * .5 + ROLL DECK I ROT REPL 'DECK' STO -1 STEP 
  109. 209 CHR 'DECK' STO+
  110. "Shuffle Done" 1 DISP 
  111. 1000 1 BEEP
  112. {#0 #0} PVIEW
  113. \>>
  114.  
  115. GETCARD
  116. \<< 
  117. @GETCARD Check deck and get a card
  118. IF DECK NUM 1 < THEN SHUF END
  119. DECK DUP NUM \-> D N
  120.   \<< D 1 N 1 - CHR REPL 'DECK' STO 
  121.       D N DUP SUB NUM 
  122.       DUP 13 MOD 1 + SWAP 4 MOD 1 + 10 / +
  123.   \>>
  124. \>>
  125.  
  126. CHECKCARD   @ This function clears the last arg flag
  127. \<< -55 CF  @ Enable last args to get predictable results
  128.     IFERR 1 PVARS DROP :1:769 POS THEN DROP 0 END
  129.     IFERR 2 PVARS DROP :2:769 POS THEN DROP 0 END
  130.     OR
  131. \>>
  132.  
  133.  
  134. @ Other Variables
  135. CRDX 0
  136. DECK ""
  137.  
  138. END
  139.  
  140.  
  141.